\(\int x (a+b \arccos (c x))^2 \, dx\) [149]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 12, antiderivative size = 76 \[ \int x (a+b \arccos (c x))^2 \, dx=-\frac {1}{4} b^2 x^2-\frac {b x \sqrt {1-c^2 x^2} (a+b \arccos (c x))}{2 c}-\frac {(a+b \arccos (c x))^2}{4 c^2}+\frac {1}{2} x^2 (a+b \arccos (c x))^2 \]

[Out]

-1/4*b^2*x^2-1/4*(a+b*arccos(c*x))^2/c^2+1/2*x^2*(a+b*arccos(c*x))^2-1/2*b*x*(a+b*arccos(c*x))*(-c^2*x^2+1)^(1
/2)/c

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4724, 4796, 4738, 30} \[ \int x (a+b \arccos (c x))^2 \, dx=-\frac {b x \sqrt {1-c^2 x^2} (a+b \arccos (c x))}{2 c}-\frac {(a+b \arccos (c x))^2}{4 c^2}+\frac {1}{2} x^2 (a+b \arccos (c x))^2-\frac {1}{4} b^2 x^2 \]

[In]

Int[x*(a + b*ArcCos[c*x])^2,x]

[Out]

-1/4*(b^2*x^2) - (b*x*Sqrt[1 - c^2*x^2]*(a + b*ArcCos[c*x]))/(2*c) - (a + b*ArcCos[c*x])^2/(4*c^2) + (x^2*(a +
 b*ArcCos[c*x])^2)/2

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 4724

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*ArcCo
s[c*x])^n/(d*(m + 1))), x] + Dist[b*c*(n/(d*(m + 1))), Int[(d*x)^(m + 1)*((a + b*ArcCos[c*x])^(n - 1)/Sqrt[1 -
 c^2*x^2]), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && NeQ[m, -1]

Rule 4738

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Simp[(-(b*c*(n + 1))^(-1)
)*Simp[Sqrt[1 - c^2*x^2]/Sqrt[d + e*x^2]]*(a + b*ArcCos[c*x])^(n + 1), x] /; FreeQ[{a, b, c, d, e, n}, x] && E
qQ[c^2*d + e, 0] && NeQ[n, -1]

Rule 4796

Int[((a_.) + ArcCos[(c_.)*(x_)]*(b_.))^(n_.)*((f_.)*(x_))^(m_)*((d_) + (e_.)*(x_)^2)^(p_), x_Symbol] :> Simp[f
*(f*x)^(m - 1)*(d + e*x^2)^(p + 1)*((a + b*ArcCos[c*x])^n/(e*(m + 2*p + 1))), x] + (Dist[f^2*((m - 1)/(c^2*(m
+ 2*p + 1))), Int[(f*x)^(m - 2)*(d + e*x^2)^p*(a + b*ArcCos[c*x])^n, x], x] - Dist[b*f*(n/(c*(m + 2*p + 1)))*S
imp[(d + e*x^2)^p/(1 - c^2*x^2)^p], Int[(f*x)^(m - 1)*(1 - c^2*x^2)^(p + 1/2)*(a + b*ArcCos[c*x])^(n - 1), x],
 x]) /; FreeQ[{a, b, c, d, e, f, p}, x] && EqQ[c^2*d + e, 0] && GtQ[n, 0] && IGtQ[m, 1] && NeQ[m + 2*p + 1, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} x^2 (a+b \arccos (c x))^2+(b c) \int \frac {x^2 (a+b \arccos (c x))}{\sqrt {1-c^2 x^2}} \, dx \\ & = -\frac {b x \sqrt {1-c^2 x^2} (a+b \arccos (c x))}{2 c}+\frac {1}{2} x^2 (a+b \arccos (c x))^2-\frac {1}{2} b^2 \int x \, dx+\frac {b \int \frac {a+b \arccos (c x)}{\sqrt {1-c^2 x^2}} \, dx}{2 c} \\ & = -\frac {1}{4} b^2 x^2-\frac {b x \sqrt {1-c^2 x^2} (a+b \arccos (c x))}{2 c}-\frac {(a+b \arccos (c x))^2}{4 c^2}+\frac {1}{2} x^2 (a+b \arccos (c x))^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.37 \[ \int x (a+b \arccos (c x))^2 \, dx=\frac {c x \left (2 a^2 c x-b^2 c x-2 a b \sqrt {1-c^2 x^2}\right )+2 b c x \left (2 a c x-b \sqrt {1-c^2 x^2}\right ) \arccos (c x)+b^2 \left (-1+2 c^2 x^2\right ) \arccos (c x)^2+2 a b \arcsin (c x)}{4 c^2} \]

[In]

Integrate[x*(a + b*ArcCos[c*x])^2,x]

[Out]

(c*x*(2*a^2*c*x - b^2*c*x - 2*a*b*Sqrt[1 - c^2*x^2]) + 2*b*c*x*(2*a*c*x - b*Sqrt[1 - c^2*x^2])*ArcCos[c*x] + b
^2*(-1 + 2*c^2*x^2)*ArcCos[c*x]^2 + 2*a*b*ArcSin[c*x])/(4*c^2)

Maple [A] (verified)

Time = 0.72 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.54

method result size
parts \(\frac {a^{2} x^{2}}{2}+\frac {b^{2} \left (\frac {c^{2} x^{2} \arccos \left (c x \right )^{2}}{2}-\frac {\arccos \left (c x \right ) \left (c x \sqrt {-c^{2} x^{2}+1}+\arccos \left (c x \right )\right )}{2}+\frac {\arccos \left (c x \right )^{2}}{4}-\frac {c^{2} x^{2}}{4}+\frac {1}{4}\right )}{c^{2}}+\frac {2 a b \left (\frac {c^{2} x^{2} \arccos \left (c x \right )}{2}-\frac {c x \sqrt {-c^{2} x^{2}+1}}{4}+\frac {\arcsin \left (c x \right )}{4}\right )}{c^{2}}\) \(117\)
derivativedivides \(\frac {\frac {c^{2} x^{2} a^{2}}{2}+b^{2} \left (\frac {c^{2} x^{2} \arccos \left (c x \right )^{2}}{2}-\frac {\arccos \left (c x \right ) \left (c x \sqrt {-c^{2} x^{2}+1}+\arccos \left (c x \right )\right )}{2}+\frac {\arccos \left (c x \right )^{2}}{4}-\frac {c^{2} x^{2}}{4}+\frac {1}{4}\right )+2 a b \left (\frac {c^{2} x^{2} \arccos \left (c x \right )}{2}-\frac {c x \sqrt {-c^{2} x^{2}+1}}{4}+\frac {\arcsin \left (c x \right )}{4}\right )}{c^{2}}\) \(118\)
default \(\frac {\frac {c^{2} x^{2} a^{2}}{2}+b^{2} \left (\frac {c^{2} x^{2} \arccos \left (c x \right )^{2}}{2}-\frac {\arccos \left (c x \right ) \left (c x \sqrt {-c^{2} x^{2}+1}+\arccos \left (c x \right )\right )}{2}+\frac {\arccos \left (c x \right )^{2}}{4}-\frac {c^{2} x^{2}}{4}+\frac {1}{4}\right )+2 a b \left (\frac {c^{2} x^{2} \arccos \left (c x \right )}{2}-\frac {c x \sqrt {-c^{2} x^{2}+1}}{4}+\frac {\arcsin \left (c x \right )}{4}\right )}{c^{2}}\) \(118\)

[In]

int(x*(a+b*arccos(c*x))^2,x,method=_RETURNVERBOSE)

[Out]

1/2*a^2*x^2+b^2/c^2*(1/2*c^2*x^2*arccos(c*x)^2-1/2*arccos(c*x)*(c*x*(-c^2*x^2+1)^(1/2)+arccos(c*x))+1/4*arccos
(c*x)^2-1/4*c^2*x^2+1/4)+2*a*b/c^2*(1/2*c^2*x^2*arccos(c*x)-1/4*c*x*(-c^2*x^2+1)^(1/2)+1/4*arcsin(c*x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.30 \[ \int x (a+b \arccos (c x))^2 \, dx=\frac {{\left (2 \, a^{2} - b^{2}\right )} c^{2} x^{2} + {\left (2 \, b^{2} c^{2} x^{2} - b^{2}\right )} \arccos \left (c x\right )^{2} + 2 \, {\left (2 \, a b c^{2} x^{2} - a b\right )} \arccos \left (c x\right ) - 2 \, {\left (b^{2} c x \arccos \left (c x\right ) + a b c x\right )} \sqrt {-c^{2} x^{2} + 1}}{4 \, c^{2}} \]

[In]

integrate(x*(a+b*arccos(c*x))^2,x, algorithm="fricas")

[Out]

1/4*((2*a^2 - b^2)*c^2*x^2 + (2*b^2*c^2*x^2 - b^2)*arccos(c*x)^2 + 2*(2*a*b*c^2*x^2 - a*b)*arccos(c*x) - 2*(b^
2*c*x*arccos(c*x) + a*b*c*x)*sqrt(-c^2*x^2 + 1))/c^2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 131 vs. \(2 (65) = 130\).

Time = 0.28 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.72 \[ \int x (a+b \arccos (c x))^2 \, dx=\begin {cases} \frac {a^{2} x^{2}}{2} + a b x^{2} \operatorname {acos}{\left (c x \right )} - \frac {a b x \sqrt {- c^{2} x^{2} + 1}}{2 c} - \frac {a b \operatorname {acos}{\left (c x \right )}}{2 c^{2}} + \frac {b^{2} x^{2} \operatorname {acos}^{2}{\left (c x \right )}}{2} - \frac {b^{2} x^{2}}{4} - \frac {b^{2} x \sqrt {- c^{2} x^{2} + 1} \operatorname {acos}{\left (c x \right )}}{2 c} - \frac {b^{2} \operatorname {acos}^{2}{\left (c x \right )}}{4 c^{2}} & \text {for}\: c \neq 0 \\\frac {x^{2} \left (a + \frac {\pi b}{2}\right )^{2}}{2} & \text {otherwise} \end {cases} \]

[In]

integrate(x*(a+b*acos(c*x))**2,x)

[Out]

Piecewise((a**2*x**2/2 + a*b*x**2*acos(c*x) - a*b*x*sqrt(-c**2*x**2 + 1)/(2*c) - a*b*acos(c*x)/(2*c**2) + b**2
*x**2*acos(c*x)**2/2 - b**2*x**2/4 - b**2*x*sqrt(-c**2*x**2 + 1)*acos(c*x)/(2*c) - b**2*acos(c*x)**2/(4*c**2),
 Ne(c, 0)), (x**2*(a + pi*b/2)**2/2, True))

Maxima [F]

\[ \int x (a+b \arccos (c x))^2 \, dx=\int { {\left (b \arccos \left (c x\right ) + a\right )}^{2} x \,d x } \]

[In]

integrate(x*(a+b*arccos(c*x))^2,x, algorithm="maxima")

[Out]

1/2*a^2*x^2 + 1/2*(2*x^2*arccos(c*x) - c*(sqrt(-c^2*x^2 + 1)*x/c^2 - arcsin(c*x)/c^3))*a*b + 1/2*(x^2*arctan2(
sqrt(c*x + 1)*sqrt(-c*x + 1), c*x)^2 - 2*c*integrate(sqrt(c*x + 1)*sqrt(-c*x + 1)*x^2*arctan2(sqrt(c*x + 1)*sq
rt(-c*x + 1), c*x)/(c^2*x^2 - 1), x))*b^2

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.57 \[ \int x (a+b \arccos (c x))^2 \, dx=\frac {1}{2} \, b^{2} x^{2} \arccos \left (c x\right )^{2} + a b x^{2} \arccos \left (c x\right ) + \frac {1}{2} \, a^{2} x^{2} - \frac {1}{4} \, b^{2} x^{2} - \frac {\sqrt {-c^{2} x^{2} + 1} b^{2} x \arccos \left (c x\right )}{2 \, c} - \frac {\sqrt {-c^{2} x^{2} + 1} a b x}{2 \, c} - \frac {b^{2} \arccos \left (c x\right )^{2}}{4 \, c^{2}} - \frac {a b \arccos \left (c x\right )}{2 \, c^{2}} + \frac {b^{2}}{8 \, c^{2}} \]

[In]

integrate(x*(a+b*arccos(c*x))^2,x, algorithm="giac")

[Out]

1/2*b^2*x^2*arccos(c*x)^2 + a*b*x^2*arccos(c*x) + 1/2*a^2*x^2 - 1/4*b^2*x^2 - 1/2*sqrt(-c^2*x^2 + 1)*b^2*x*arc
cos(c*x)/c - 1/2*sqrt(-c^2*x^2 + 1)*a*b*x/c - 1/4*b^2*arccos(c*x)^2/c^2 - 1/2*a*b*arccos(c*x)/c^2 + 1/8*b^2/c^
2

Mupad [F(-1)]

Timed out. \[ \int x (a+b \arccos (c x))^2 \, dx=\int x\,{\left (a+b\,\mathrm {acos}\left (c\,x\right )\right )}^2 \,d x \]

[In]

int(x*(a + b*acos(c*x))^2,x)

[Out]

int(x*(a + b*acos(c*x))^2, x)